package jp.co.apl.haven_enquete.android.activity;

import jp.co.apl.haven_enquete.android.R;
import jp.co.apl.haven_enquete.android.dao.QuestionDataDao;
import android.test.ActivityInstrumentationTestCase2;
import android.test.suitebuilder.annotation.SmallTest;
import android.widget.TextView;

public class MainTest extends ActivityInstrumentationTestCase2<Main> {

    public MainTest() {
        super("jp.co.apl.haven_enquete", Main.class);
    }

    protected void setUp() throws Exception {
        super.setUp();
    }

    @SmallTest
    public void testRun() {
        new QuestionDataDao(getActivity()).initDataFile();

        Main target = getActivity();

        TextView title = (TextView) target.findViewById(R.id.main_title);
        TextView text = (TextView) target.findViewById(R.id.main_text);

        assertEquals("施設の種類", title.getText().toString());
        assertEquals("あなたが今生活している施設は、次のうちどれですか？", text.getText().toString());
    }

}
